import logging
import yagmail


def log_cat():
    logging.basicConfig(level=logging.DEBUG, format='%(name)s_%(levelno)s_%(levelname)s', handlers=[
        logging.StreamHandler(),
        logging.FileHandler('log.txt')
    ])


def find_mail(a):
    mail = yagmail.SMTP(user='2857756581@qq.com', password='aqjrkrthryuedfhh', host='smtp.qq.com')
    mail.send(to='2857756581@qq.com',subject='测试标题',contents='测试内容',attachments=a)
